package com.example.mapstruct.entity.vo;

import lombok.Data;

/**
 * 返回踢
 *
 * @author linx
 * @since 2021-12-20 11:21
 */
@Data
public class ApiResult<T> {
    private T payload;
    private Integer code;
    private String message;

    public T checkCode() {
        if (code == 200000) {
            return payload;
        }
        throw new RuntimeException(message);
    }

}
